<?php
/**
 * An ActiveRecord implementation roughly inspired by Django Models
 * Do not use QuerySets
 * Mysql only
 *
 *
 */
class DbModel {

    /**
     * @var DbManager All subclass definition MUST have their own
     */
    public static $objects;

    /**
     * All subclass MUST implement this
     * @return DbManager
     */
    public static function buildManager() {
        // return new DbManager(self,'table');
    }

    /**
     * imports data from array
     */
    public function __construct($data=array()) {
        foreach ($data as $key=>$value)
            $this->$key=$value;
    }

    /**
     * save current instance
     * @return bool
     */
    public function save($force_insert=false, $force_update=false) {

    }

    /**
     * @return bool
     */
    public function delete() {

    }
}